//import './assets/main.css'

import { createApp } from 'vue'
import { createPinia } from 'pinia'
import piniaPluginPersistedstate from 'pinia-plugin-persistedstate'
//导入element plus组件
import ElementPlus from 'element-plus'
//导入element plus的样式
import 'element-plus/dist/index.css'

import App from './App.vue'
import router from './router'
//导入图标
import * as ElementPlusIconsVue from '@element-plus/icons-vue'
//汉化:element plus默认是英文环境，需要切换到中文
import zhCn from 'element-plus/es/locale/lang/zh-cn'

const app = createApp(App)
const pinia = createPinia()
pinia.use(piniaPluginPersistedstate)
app.use(pinia)
app.use(router)
//使用element plus
app.use(ElementPlus,{
    locale: zhCn //使用汉化
})
//注册图标
for (const [key, component] of Object.entries(ElementPlusIconsVue)) {
    app.component(key, component)
}
app.mount('#app')
